﻿using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using System.Text;

namespace T.FAS.Runtime.Metadata.Entity.Page
{
    /// <summary>
    /// 界面整体的事件
    /// </summary>
    [DataContract]
    [Serializable]
    public class PageEvent : ICloneable
    {
        /// <summary>
        /// 主键
        /// </summary>
        [DataMember]
        public string ID { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int EventOrder { get; set; }
        /// <summary>
        /// PageID
        /// </summary>
        public string PageID { get; set; }
        /// <summary>
        /// 事件编码
        /// </summary>
        [DataMember]
        public string Code { get; set; }
        /// <summary>
        /// 事件名称
        /// </summary>
        [DataMember]
        public string Name { get; set; }
        /// <summary>
        /// 所属控件ID
        /// </summary>
        [DataMember]
        public string ComponentID { get; set; }
        /// <summary>
        /// 所属控件标识
        /// </summary>
        [DataMember]
        public string InstanceCode { get; set; }
        /// <summary>
        /// 事件调用的Action类型
        /// </summary>        
        [DataMember]
        public ActionType ActionType { get; set; }
        /// <summary>
        /// 事件调用的Action
        /// </summary>
        [DataMember]
        public string ActionID { get; set; }
        /// <summary>
        /// 显示内容
        /// </summary>
        [DataMember]
        public string DisplayInfo { get; set; }
        /// <summary>
        /// Action来源
        /// </summary>
        [DataMember]
        public ActionSourceType ActionSourceType { get; set; }
        /// <summary>
        /// 具体某一个DQ/DEO的标识  DQ.ID/DEO.ID
        /// </summary>
        [DataMember]
        public string ActionSourceID { get; set; }
        /// <summary>
        /// 界面扩展JS脚本
        /// </summary>
        [DataMember]
        public string JSScript { get; set; }
        /// <summary>
        /// 界面扩展JS脚本
        /// </summary>
        [DataMember]
        public string JSScriptES5 { get; set; }
        public List<string> Params { get; set; }
        [DataMember]
        public Dictionary<string, object> DataSource { get; set; }

        public object Clone()
        {
            return this.MemberwiseClone();
        }
    }
}
